Fix TypeError on accessing a component instance while unmounting (T1327953)#33513
Merged
GoodDayForSurf merged 7 commits intoDevExpress:26_1from May 8, 2026
Merged
Fix TypeError on accessing a component instance while unmounting (T1327953)#33513GoodDayForSurf merged 7 commits intoDevExpress:26_1from
GoodDayForSurf merged 7 commits intoDevExpress:26_1from
Conversation
a841820 to
3d6b2dc
Compare
dxvladislavvolkov
approved these changes
May 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses a React wrapper edge case where an option-change callback can trigger component unmount/disposal while OptionsManager.onOptionChanged is still executing, previously leading to a TypeError when accessing the widget instance.
Changes:
- Prevents a crash by making the
skipOptionsRollBackaccess safe when the instance becomes unavailable during unmount. - Adds a regression test covering disposal/unmount during an option change handler (T1327953).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/devextreme-react/src/core/options-manager.ts | Makes skipOptionsRollBack access resilient to instance becoming null during onOptionChanged. |
| packages/devextreme-react/src/core/tests/props-updating.test.tsx | Adds a test ensuring onOptionChanged doesn’t throw if the option change handler disposes the manager. |
ajivanyandev
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.